home *** CD-ROM | disk | FTP | other *** search
Wrap
;C-Script v5.0 ⌐ 1998 C-Team. All rights reserved. ;Configure at your own risk ;XDCC file #xdcc on ctcp 1:XDCC HELP: { .notice $nick XDCC HELP: .notice $nick LIST: List packets in the XDCC system .notice $nick SEARCH <wildcard>: Search for XDCC packets containing <wildcard> .notice $nick GET <packet #>: Get XDCC packet <packet #> .notice $nick XDCC HELP END } ctcp 1:XDCC LIST: { %var = $readini sysfiles\xdcc\xdcc.ini stats xdcclist inc %var writeini sysfiles\xdcc\xdcc.ini stats xdcclist %var %i = 1 %lines = $readini sysfiles\xdcc\xdcc.ini stats total .notice $nick Welcome to $me $+ 's XDCC .notice $nick You are XDCC user number %var $+ . Total number of packets available: %lines :back if (%i <= %lines) { %CurInfo = $readini sysfiles\xdcc\xdcc.ini files %i .notice $nick $chr(35) $+ %i ( $+ $nopath($gettok(%CurInfo,1,32)) $+ ) $gettok(%CurInfo,2,32) bytes. # of DL's: $readini sysfiles\xdcc\xdcc.ini stats %i Description: $gettok(%CurInfo,3-,32) inc %i goto back } write sysfiles\xdcc\xdcc.log XDCC LIST by $nick ( $+ $gettok($address($nick,5),2,33) $+ ) on $fulldate } ctcp 1:XDCC SEARCH: { if ($3 == $null) { .notice ERROR Nothing to search for! | write sysfiles\xdcc\xdcc.log FAILED XDCC GET by $nick ( $+ $gettok($address($nick,5),2,33) $+ ) on $fulldate | halt } %var = $readini sysfiles\xdcc\xdcc.ini stats xdccsearch inc %var writeini sysfiles\xdcc\xdcc.ini stats xdccsearch %var %i = 1 %lines = $readini sysfiles\xdcc\xdcc.ini stats total .notice $nick You are XDCC user number: %var $+ . Searching: %lines packets :back if (%i <= %lines) { %CurInfo = $readini sysfiles\xdcc\xdcc.ini files %i if ($3 isin %CurInfo) { .notice $nick $chr(35) $+ %i ( $+ $nopath($gettok(%CurInfo,1,32)) $+ ) $gettok(%CurInfo,2,32) bytes. # of DL's: $readini sysfiles\xdcc\xdcc.ini stats %i Description: $gettok(%CurInfo,3-,32) } inc %i goto back } write sysfiles\xdcc\xdcc.log XDCC SEARCH by $nick ( $+ $gettok($address($nick,5),2,33) $+ ) on $fulldate } ctcp 1:XDCC GET: { %var = $readini sysfiles\xdcc\xdcc.ini stats $3 if (%var == $null) { notice $nick Sorry packet $3 doesn't exist. | write sysfiles\xdcc\xdcc.log Failed XDCC GET by $nick ( $+ $gettok($address($nick,5),2,33) $+ ) on $fulldate | halt } inc %var writeini sysfiles\xdcc\xdcc.ini stats $3 %var %var = $readini sysfiles\xdcc\xdcc.ini files $3 .dcc send $nick $gettok(%var,1,32) write sysfiles\xdcc\xdcc.log XDCC GET by $nick ( $+ $gettok($address($nick,5),2,33) $+ ) on $fulldate } ctcp 1:XDCC: { .notice $nick XDCC HELP: .notice $nick LIST: List packets in the XDCC system .notice $nick SEARCH <wildcard>: Search for XDCC packets containing <wildcard> .notice $nick GET <packet #>: Get XDCC packet <packet #> .notice $nick XDCC HELP END } #XDCC end alias xdcc { echo -a $+ $clr(info) $+ XDCC HELP: echo -a $+ $clr(info) $+ /addx: $+ $clr(info2) Add a packet to the XDCC system echo -a $+ $clr(info) $+ /delx #: $+ $clr(info2) Delete packet number "#" from the XDCC system echo -a $+ $clr(info) $+ /listx: $+ $clr(info2) List files in the XDCC system echo -a $+ $clr(info) $+ /offerx: $+ $clr(info2) Offer XDCC packets to the current channel } alias helpx { echo -a $+ $clr(info) $+ XDCC HELP: echo -a $+ $clr(info) $+ /addx: $+ $clr(info2) Add a packet to the XDCC system echo -a $+ $clr(info) $+ /delx #: $+ $clr(info2) Delete packet number "#" from the XDCC system echo -a $+ $clr(info) $+ /listx: $+ $clr(info2) List files in the XDCC system echo -a $+ $clr(info) $+ /offerx: $+ $clr(info2) Offer XDCC packets to the current channel } alias addx { %lines = $readini sysfiles\xdcc\xdcc.ini stats total inc %lines set %file $$dir $mircdir set %xdccdesc $$?="Description:" writeini sysfiles\xdcc\xdcc.ini files %lines %file $lof(%file) %xdccdesc writeini sysfiles\xdcc\xdcc.ini stats %lines 0 writeini sysfiles\xdcc\xdcc.ini stats total %lines echo -a $+ $clr(info) $+ *** " $+ $nopath(%file) $+ " added with the description, " $+ %xdccdesc $+ " Packet number: %lines unset %file %lines %xdccdesc if ($window(@XDCCáList:) != $null) { listx } } alias delx { if ($1 == $null) { set %temp $$?="Packet number to delete:" } else { set %temp $1 } %lines = $readini sysfiles\xdcc\xdcc.ini stats total if (%lines == 0) { echo -a $+ $clr(info) $+ *** ERROR: No files to delete | halt } if (%temp !isnum) { echo -a $+ $clr(info) $+ *** Error %temp isn't a number | halt } if (%temp > %lines) { echo -a $+ $clr(info) $+ *** Error no such number: %temp | halt } if (%lines == %temp) { echo -a $+ $clr(info) $+ *** Packet %temp removed from XDCC list | remini $mircdirxdcc\xdcc.ini files %lines | remini $mircdirxdcc\xdcc.ini stats %lines | dec %lines | writeini sysfiles\xdcc\xdcc.ini stats total %lines | unset %lines | if ($window(@XDCCáList:) != $null) { listx } | halt } %curmove = $readini sysfiles\xdcc\xdcc.ini files %lines writeini sysfiles\xdcc\xdcc.ini files %temp %curmove remini sysfiles\xdcc\xdcc.ini files %lines %curmove = $readini sysfiles\xdcc\xdcc.ini stats %lines writeini sysfiles\xdcc\xdcc.ini stats %temp %curmove remini sysfiles\xdcc\xdcc.ini stats %lines dec %lines writeini sysfiles\xdcc\xdcc.ini stats total %lines echo -a $+ $clr(info) $+ *** Packet %temp removed from XDCC list unset %curmove %lines if ($window(@XDCCáList:) != $null) { listx } } alias listx { window -c @XDCCáList: %i = 1 %lines = $readini sysfiles\xdcc\xdcc.ini stats total if (%lines == 0) { echo -a $+ $clr(info) $+ *** No XDCC packets found | halt } wincheck @XDCCáList: -l @XDCCáList: $center(550,200,@XDCCáList:) $wh(550,200,@XDCCáList:) @XDCCáList: Arial 12 .timer 1 1 window -b @XDCCáList: :back if (%i <= %lines) { %CurInfo = $readini sysfiles\xdcc\xdcc.ini files %i aline @XDCCáList: $+ $clr(info) $+ $chr(35) %i $nopath($gettok(%CurInfo,1,32)) $+ : $+ $clr(info2) $gettok(%CurInfo,2,32) bytes $+ $clr(info) $+ # of DL's: $+ $clr(info2) $readini sysfiles\xdcc\xdcc.ini stats %i $+ $clr(info) $+ Description: $+ $clr(info2) $gettok(%CurInfo,3-,32) inc %i goto back } } alias offerx { %i = 1 %lines = $readini sysfiles\xdcc\xdcc.ini stats total say Welcome to $me $+ 's XDCC say Total number of packets available: %lines :back if (%i <= %lines) { %CurInfo = $readini sysfiles\xdcc\xdcc.ini files %i say $+ $clr(info) $+ $chr(35) %i $nopath($gettok(%CurInfo,1,32)) $+ : $+ $clr(info2) $gettok(%CurInfo,2,32) bytes $+ $clr(info) $+ # of DL's: $+ $clr(info2) $readini sysfiles\xdcc\xdcc.ini stats %i $+ $clr(info) $+ Description: $+ $clr(info2) $gettok(%CurInfo,3-,32) inc %i goto back } say Type /ctcp $me XDCC GET #<number> to get the packet. } menu @XDCCáList: { dclick listx Delete Packet:delx $remove($gettok($strip($sline($active,1)),1,32),$chr(35)) Add Packet:addx }